Try caching
authorFelix Krull <f_krull@gmx.de>
Wed, 22 May 2019 11:09:56 +0000 (13:09 +0200)
committerColin Walters <walters@verbum.org>
Fri, 6 May 2022 16:53:54 +0000 (12:53 -0400)
rust-bindings/rust/.gitlab-ci.yml

index 80f412529d0282757bc2aa5166e9070543591609..ca75dde3ef1dc61440d1c9f3597a5b3df597f3fc 100644 (file)
@@ -4,6 +4,7 @@ variables:
   CARGO_TARGET_DIR: target
   # --all-features
   CURRENT_FEATURES: --features v2018_9
+  CARGO_HOME: ${CI_PROJECT_DIR}/cargo
 
 before_script:
 - echo deb http://ftp.debian.org/debian stretch-backports main > /etc/apt/sources.list.d/backports.list
@@ -19,6 +20,10 @@ ostree-sys:
   stage: build
   script:
   - cargo test --verbose --manifest-path sys/Cargo.toml ${CURRENT_FEATURES}
+  cache:
+    paths:
+    - cargo/
+    - target/
 
 publish_ostree-sys:
   stage: publish
@@ -31,16 +36,28 @@ ostree:
   stage: build
   script:
   - cargo test --verbose ${CURRENT_FEATURES}
+  cache:
+    paths:
+    - cargo/
+    - target/
 
 ostree_default_features:
   stage: build
   script:
   - cargo test --verbose
+  cache:
+    paths:
+    - cargo/
+    - target/
 
 ostree_all_features:
   stage: build
   script:
   - cargo test --verbose --all-features
+  cache:
+    paths:
+    - cargo/
+    - target/
   allow_failure: true
 
 ostree_nightly:
@@ -48,6 +65,10 @@ ostree_nightly:
   image: rustlang/rust:nightly
   script:
   - cargo test --verbose ${CURRENT_FEATURES}
+  cache:
+    paths:
+    - cargo/
+    - target/
 
 publish_ostree:
   stage: publish